print("默认参数只会运算一次，不是每次都会重新运算")
def add_to(num, target=[]):
    target.append(num)
    return target
print(add_to(1))
print(add_to(2))
print(add_to(3))

print("不能将默认参数定义为可变参数")
print("正确做法")
def add_to(element, target=None):
    if target is None:
        target = []
    target.append(element)
    return target
print(add_to(1))
print(add_to(2))
print(add_to(3))